<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <ul id="uls">
        <li class="111">111</li>
        <li class="222">222</li>
        <li class="333">333</li>
        <li class="444">444</li>
        <button>点击</button>
    </ul>
    <script>
        uls.onclick = function(e){
            console.log(e.target.nodeName);
            if (e.target.classList.contains('111')){
                console.log(111);
            }
            if (e.target.classList.contains('222')){
                console.log(222);
            }
            if (e.target.classList.contains('333')){
                console.log(333);
            }
            if (e.target.classList.contains('444')){
                console.log(444);
            }
         
        }
    </script>
</body>
</html>